//
//  AudioManager.h
//  ios-swift-pjsua2
//
//  Created by hollycrm on 2023/3/5.
//

#import <Foundation/Foundation.h>

#import <AVFoundation/AVFoundation.h>



@interface AudioManager : NSObject

{
    AVAudioPlayer *m_audioPlayer;
}

@property (atomic, readonly)BOOL _isSpeakerOn;

@property (atomic, readonly)BOOL _isMicOn;



+(AudioManager*)shared;

// 打开扬声器

- (void)setSpeakerOn;

// 关闭扬声器

- (void)setSpeakerOff;

// 打开麦克风

- (void)openMic;

// 关闭麦克风

-(void)closeMic;

//释放声音设备

-(void)releaseSound;

- (void)setSystemVolumeTo:(float)value;

@end





